<?php
/* ================================================================================
 * Living Word Admin	 
 *
 * index.php: This file contains cases for the fuse-box framework.
 *
 * Author: Eric Hendrickson (enhendrickson@liberty.edu)
 * Date: 2/15/05
   ================================================================================ */

	ini_set("include_path", ini_get("include_path") . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] . "/Common");
	//include files
	include('Admin.conf.php');
	include_once("Application/ApplicationTemplate.php");
	include_once("Application/Application.php");
	include_once("Application/AppServer.php");
	
	//start buffering the output
	ob_start();	
	
	$Application = new Application();
	$Application->ApplicationInfoByCurrentLocation();
	$ApplicationRoot = $Application->ApplicationInfo['app_path'];
	$AppID = $Application->ApplicationInfo['app_id'];
	
	$Template = new ApplicationTemplate("/".$ApplicationRoot."templates/admin/template.htm");
	
	$AppServer = new AppServer();
	
	//Get the session info
	$SessionInfo = $SSO->getSessionInformation();	
				
	switch($_GET['action'])
	{
		case 'logout':
			$Template->printTemplate($AppServer,'logout.php');
			break;
		case 'login':
			$Template->printTemplate($AppServer,'login.php');
			break;
		case 'main':
			$Template->printTemplate($AppServer,'main.php');
			break;
		case 'users':
			$Template->printTemplate($AppServer,'users.php');
			break;
		case 'users_new':
			$Template->printTemplate($AppServer,'users_new.php');
			break;
		case 'users_edit':
			$Template->printTemplate($AppServer,'users_edit.php');
			break;
		case 'users_delete':
			$Template->printTemplate($AppServer,'users_delete.php');
			break;
		case 'users_access':
			$Template->printTemplate($AppServer,'users_access.php');
			break;
		case 'users_ministries':
			$Template->printTemplate($AppServer,'users_ministries.php');
			break;
		case 'roles':
			$Template->printTemplate($AppServer,'roles.php');
			break;
		case 'permissions':
			$Template->printTemplate($AppServer,'permissions.php');
			break;
		case 'ministries':
			$Template->printTemplate($AppServer,'ministries.php');
			break;
		case 'applications':
			$Template->printTemplate($AppServer,'applications.php');
			break;
		default:
			$Template->printTemplate($AppServer,'main.php');
			break;
	}

	//flush all buffered output to the browser and stop buffering
	ob_end_flush();
?>
 
 
